//
//  GSStartADView.m
//  GameSky
//
//  Created by lanou on 16/1/21.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSStartADView.h"

#define kBtnWidth 50
#define kBtnHeight 25

@implementation GSStartADView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.bounds];
        imageView.image = [UIImage imageNamed:@"LaunchImage-800-667h"];
        
        [self addSubview:imageView];
        
        imageView.userInteractionEnabled = YES;
        
        _coverImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight - kHeight / 7)];
        [self addSubview:_coverImage];
        
        _coverImage.userInteractionEnabled = YES;
        
    }
    return self;
}

- (void)setAdImage:(UIImage *)AdImage
{
    _AdImage = AdImage;
    _coverImage.image = AdImage;
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:_model.link]];
}

@end
